'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});
var Model = function Model(options) {

    var defaults = {};

    $.extend(true, this, defaults, options);
};

Model.prototype.popList = function () {
    var ajax = $.ajax({
        url: window.Url.bgm.list,
        type: 'GET',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8'
        //data        : params
    });
    return ajax;
};

Model.prototype.addEle = function (params) {
    var ajax = $.ajax({
        url: window.Url.bgm.add,
        type: 'POST',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8',
        data: JSON.stringify(params)
    });
    return ajax;
};

Model.prototype.delEle = function (params) {
    var ajax = $.ajax({
        url: window.Url.bgm.delete,
        type: 'POST',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8',
        data: JSON.stringify(params)
    });
    return ajax;
};

Model.prototype.moveEle = function (params) {
    var ajax = $.ajax({
        url: window.Url.bgm.move,
        type: 'POST',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8',
        data: JSON.stringify(params)
    });
    return ajax;
};

Model.prototype.query = function (params) {
    var ajax = $.ajax({
        url: window.Url.bgm.query + '?keyword=' + params.keyword + '&page_no=1&page_size=20',
        type: 'GET',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8'
    });
    return ajax;
};

exports.default = Model;